﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="uploadphoto.aspx.vb" Inherits="WSADProject.uploadphoto" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .auto-style1 {
        }
        .auto-style3 {
        }
        .auto-style4 {
            height: 30px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <table style="width:100%;">
        <tr>
            <td class="auto-style1">Description:</td>
            <td class="auto-style1"><asp:TextBox ID="txtCaption" runat="server" Text='<%# Bind("Caption")%>' Height="89px" TextMode="MultiLine" Width="490px"></asp:TextBox></td>
            
        </tr>
        <tr>
            <td class="auto-style1">Latitude:</td>
            <td class="auto-style1"><asp:TextBox ID="TxtLat" runat="server" Text='<%# Eval("LatLoc", "{0:n2}")%>' CausesValidation="True"></asp:TextBox>
                 <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="TxtLat" ValidationExpression="^[-+]?\d*\.?\d*$" ErrorMessage="Enter a valid number" ForeColor="Red"></asp:RegularExpressionValidator>
                 <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxtLat" ErrorMessage="Latitude is required" ForeColor="Red"></asp:RequiredFieldValidator>
                  <asp:RangeValidator ID="RangeValidator2" runat="server" ErrorMessage="RangeValidator" ControlToValidate="TxtLat" ForeColor="Red" MaximumValue="180" MinimumValue="-180" Type="Double">- 180 to 180</asp:RangeValidator>
            </td>
    
        </tr>
           <tr>
            <td class="auto-style4">Longitude:
               </td>
            <td class="auto-style4"><asp:TextBox ID="TxtLong" runat="server" Text='<%# Eval("LongLoc", "{0:n2}")%>' CausesValidation="True"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TxtLong" ValidationExpression="^[-+]?\d*\.?\d*$" ErrorMessage="Enter a valid Number" ForeColor="Red"></asp:RegularExpressionValidator> 
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtLong" ErrorMessage="Longitudeis Required" ForeColor="Red"></asp:RequiredFieldValidator>
                <asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="RangeValidator" ControlToValidate="TxtLong" ForeColor="Red" MaximumValue="180" MinimumValue="-180" Type="Double">-180 to 180</asp:RangeValidator>
            </td>
               
        </tr>
  
           <tr>
            <td class="auto-style3" colspan =" 2">
                <asp:FileUpload ID="fileuploadImage" runat="server" />
                <asp:RegularExpressionValidator ID="rexp" runat="server" ControlToValidate="fileuploadImage"
     ErrorMessage="Only .gif, .jpg, .png, .tiff and .jpeg" ForeColor="Red"
     ValidationExpression="(.*\.([Gg][Ii][Ff])|.*\.([Jj][Pp][Gg])|.*\.([Bb][Mm][Pp])|.*\.([pP][nN][gG])|.*\.([tT][iI][iI][fF])$)"></asp:RegularExpressionValidator>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="fileuploadImage" ErrorMessage="Image is Required" ForeColor="Red" SetFocusOnError="True"></asp:RequiredFieldValidator>
              
                <asp:Button ID="BtnNewPhoto" runat="server" Text="Upload New Photo" />
               </td>
            
        </tr> </table>
     <asp:HiddenField ID="hiddenUserName" runat="server" Value="0" />
    
</asp:Content>
